<%--
  Created by IntelliJ IDEA.
  User: 32450
  Date: 2024/08/18
  Time: 18:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
  <%
    String base = request.getContextPath() + "/";
    String url = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + base;
  %>
  <base href="<%=url%>">
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>发票管理系统</title>
  <meta name="description" content="这是一个 index 页面">
  <meta name="keywords" content="index">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp"/>
  <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
  <link rel="stylesheet" href="assets/css/amazeui.min.css"/>
  <link rel="stylesheet" href="assets/css/admin.css">
  <link rel="stylesheet" href="assets/css/app.css">
  <script type="text/javascript" src="js/jquery-1.8.3.js"></script>
  <script type="text/javascript">
    $(document).ready(function () {
      $("#login_a").click(function () {
        var account=$("[type='text']").val();
        var password=$("[type='password']").val();
        $.get("system/queryAll",{"account":account,"password":password},function (users) {
          JSON.stringify(users)
          if (users.length>0) {
            alert("登录成功");
            var enterprise_id= users[0].enterprise_id ;
            window.location.href = "http://localhost:8080/gro/invoice-list.jsp?enterprise_id="+enterprise_id+"";
          } else {
            alert("登录失败");
          };
        });

      });
    });
  </script>

  <style>
    .loginBtn {
      margin-top: 20px;
      color: #fff;
      font-size: 18px
    }

    .loginBtn > div {
      width: 100%;
      height: 40px;
      text-align: center;
      border-radius: 6px;
      background: #53d192;
      border: none;
      color: #fff;
      font-size: 18px;
      line-height: 40px;
      margin-top: 20px;
    }
  </style>
</head>
<body data-type="login">
<div class="am-g myapp-login">
  <div class="myapp-login-logo-block  tpl-login-max">
    <div class="myapp-login-logo-text">
      <div class="myapp-login-logo-text">
        发票管理系统
      </div>
    </div>
    <div class="am-u-sm-10 login-am-center">
      <form class="am-form">
        <fieldset>
          <div class="am-form-group">
            <input type="text" class="" id="doc-ipt-email-1" placeholder="请输入账号">
          </div>
          <div class="am-form-group">
            <input type="password" class="" id="doc-ipt-pwd-1" placeholder="请输入密码">
          </div>
          <a id="login_a"  class="loginBtn">
            <div>登 录</div>
          </a>
        </fieldset>
      </form>
    </div>
  </div>
</div>
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/amazeui.min.js"></script>
<script src="assets/js/app.js"></script>
</body>
</html>